package org.tsp.android.CameraExample;

import java.util.Date;

import org.tsp.android.CameraExample.R;

import android.app.Activity;
import android.content.Context;
import android.location.LocationManager;
import android.os.Bundle;
import android.view.View;
import android.widget.FrameLayout;

public class CameraExampleActivity extends Activity {
	
	private CameraSurfaceView cam;
	
	private LocationManager m_locMngr;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        cam = new CameraSurfaceView(this);
        FrameLayout preview = (FrameLayout) findViewById(R.id.preview); 
        preview.addView(cam);
        
        m_locMngr = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
    }
    
    @Override
    public void onResume()
    {	
    	super.onStart();
    	// To complete
    	// Start gps
    }
    
    @Override
    public void onPause()
    {	
    	super.onPause();
    	//m_locMngr.removeUpdates(cam);
    	// To complete
    	// Stop gps
    }
    
    public void btnTakePhotoClick(View v)
    {
    	// To complete
    	// Take photo here
    }
}